/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package stis.statpro.ibs.controller;

import java.awt.CardLayout;
import java.awt.Container;
import javax.swing.JPanel;

/**
 *
 * @author imam habib pammungkas <imam habib pamungkas@gmail.com>
 */
public class CardLayoutController  {
    private CardLayout cardLayout;
    private JPanel parentPanel;

    public CardLayoutController() {

    }

    public CardLayout getCardLayout() {
        return cardLayout;
    }

    public void setCardLayout(CardLayout cardLayout) {
        this.cardLayout = cardLayout;
    }

    public JPanel getJpanel() {
        return parentPanel;
    }

    public void setJpanel(JPanel jpanel) {
        this.parentPanel = jpanel;
    }
    
    public void next(){
        cardLayout.next(parentPanel);
    }
    
    public void previous(){
        cardLayout.previous(parentPanel);
    }

    public void show(String panelName){
        cardLayout.show(parentPanel, panelName);
    }
    
}
